<template>
  <div>
   <div class="main_top">
<m_sy v-if="tabber==0"></m_sy>
<m_xiangqing v-if="tabber==1" v-on:xqnum='xqnum'></m_xiangqing>
<m_tel v-if="tabber==2"></m_tel>
   
   </div>
    <div class="main_bom">
<foot v-on:footnum='acti' ></foot>

    </div>
  </div>
</template>

<script>
 import foot from '../components/foot.vue'  
 import m_sy from '../components/m_sy.vue'  
 import m_xiangqing from '../components/m_xiangqing.vue'  
 import m_tel from '../components/m_tel.vue'  
  export default {

    data() {
      return {
         tabber:0

      };
    },
     components: {
      foot,
      m_sy,
      m_tel,
      m_xiangqing
    },
   
    created() {
      if(this._isMobile()){
        
      }else{
           this.$router.push('/about')  
      }
    },
   
    

    methods:{
         acti(num){
      //  console.log(num)
       this.tabber=num
      },
      xqnum(num){
        // console.log(num)
        this.tabber=num
      },
       _isMobile() {
	 let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
	 return flag;
},
    },
  
    
  };
</script>

<style scoped="scoped">
.main_top{
  width: 100%;
  margin: auto;
  height: calc(100vh - 50px);
  /* background: #000; */

}
.main_bom{
  width: 100%;
  height: 50px;
  /* background: #000; */
  position:absolute;
  left: 0px;
  bottom: 0px;
}
</style>
